module(
    name = "rules_proto_grpc_js",
    version = "5.6.0",
    compatibility_level = 1,
)

bazel_dep(name = "aspect_rules_js", version = "2.4.2")
bazel_dep(name = "rules_proto_grpc", version = "5.6.0")

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(
    name = "rules_proto_grpc_js_npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "rules_proto_grpc_js_npm")

pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm", dev_dependency = True)
use_repo(pnpm, "pnpm")

download_plugins = use_extension("//:module_extensions.bzl", "download_plugins")
use_repo(
    download_plugins,
    "protoc_gen_grpc_web_plugin_darwin_arm64",
    "protoc_gen_grpc_web_plugin_darwin_x86_64",
    "protoc_gen_grpc_web_plugin_linux_arm64",
    "protoc_gen_grpc_web_plugin_linux_x86_64",
    "protoc_gen_grpc_web_plugin_windows_arm64",
    "protoc_gen_grpc_web_plugin_windows_x86_64",
    "protoc_gen_protobuf_javascript_plugin_darwin_arm64",
    "protoc_gen_protobuf_javascript_plugin_darwin_x86_64",
    "protoc_gen_protobuf_javascript_plugin_linux_arm64",
    "protoc_gen_protobuf_javascript_plugin_linux_x86_64",
    # "protoc_gen_protobuf_javascript_plugin_windows_arm64",
    "protoc_gen_protobuf_javascript_plugin_windows_x86_64",
)
